//
//  BLU.h
//  KangarooDoctor
//
//  Created by 廖罡 on 2024/2/1.
//

#import <Foundation/Foundation.h>
#import "defs.h"
#import <CoreBluetooth/CoreBluetooth.h>

NS_ASSUME_NONNULL_BEGIN

@protocol BLUP

-(void)bluDidDisconnect;
- ( void ) getDeviceList:(NSArray *) list;
-(void)bluStatusDidChange:(NSString*)msg;
-(void)didReadData:(const BYTE*)buf len:(int)len;
- ( void ) startMessare;
- ( NSString * ) getBluDeviceId;
@end

@interface BLU : NSObject
@property (nonatomic, strong) CBPeripheral *peripheral;

+(instancetype)shared;

- ( void ) writeStartData;
-(void)startWithPageName: (NSString *) name uuid:(nonnull NSString *)uuid;


- (void)connectPeripheral:(CBPeripheral *)peripheral;
-( void ) stop;


@property (nonatomic, weak) id<BLUP> delegate;

@end

NS_ASSUME_NONNULL_END
